From: Marco Trevisan (TreviƱo) Date: Mon, 25 Aug 2025 23:11:18 +0000 (+0200) Subject: unlockDialog: Do not reset the auth prompt on every tap X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~104^2^2~59 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=962d1bf12f55bfadfc41eddd6eefb7597b9edde3;p=gnome-shell.git unlockDialog: Do not reset the auth prompt on every tap Currently we have a tap event tracker that causes that every time a tap happens in the lock screen, we reset the auth prompt and this can be particularly annoying at least in three cases: 1. Just clicking everywhere in the screen may lead the unlock entry content to be cleared 2. Clicking in the screen while an authentication is in progress, cancels it 3. This may break a multi-factor authentication method, as a single click may lead previous steps to be cancelled So, while resetting the auth prompt is important when we're about to show it, it's not something we want to do while an authentication has started. As per this also do not touch the auth prompt sensitivity unless we're in an idle phase, or we may end up overriding the auth prompt state, leading for example to a text entry being editable while we're verifying the secret Fixes: 37e55df29865dac13656116efdd7abec8056dea9 Part-of: --- diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index fae4d0787..50c512fb5 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -16,6 +16,7 @@ import * as MessageTray from './messageTray.js'; import * as SwipeTracker from './swipeTracker.js'; import {formatDateWithCFormatString} from '../misc/dateUtils.js'; import * as AuthPrompt from '../gdm/authPrompt.js'; +import {AuthPromptStatus} from '../gdm/authPrompt.js'; import {MprisSource} from './mpris.js'; import {MediaMessage} from './messageList.js'; @@ -744,8 +745,15 @@ export const UnlockDialog = GObject.registerClass({ this._promptBox.add_child(this._authPrompt); } - this._authPrompt.reset(); - this._authPrompt.updateSensitivity(true); + const {verificationStatus} = this._authPrompt; + switch (verificationStatus) { + case AuthPromptStatus.NOT_VERIFYING: + case AuthPromptStatus.VERIFICATION_CANCELLED: + case AuthPromptStatus.VERIFICATION_FAILED: + this._authPrompt.reset(); + this._authPrompt.updateSensitivity( + verificationStatus === AuthPromptStatus.NOT_VERIFYING); + } } _maybeDestroyAuthPrompt() {